binding {
  basicSearchLibVersion = "1.0"
}
  
routes {
   get "/classes/@year/@semester/@classid",
    forward: "/plugins/basicSearch/information.gtpl?year=@year&semester=@semester&classid=@classid",
    validate: { year ==~ /\d{4}/ && semester ==~ /(?i)(winter|spring|summer|fall)/ && classid ==~ /[A-z][A-z][0-9]+/ }
  get "/classes/@year/@semester",
    forward: "/plugins/basicSearch/search.gtpl?year=@year&semester=@semester",
    validate: { year ==~ /\d{4}/ && semester ==~ /(?i)(winter|spring|summer|fall)/ }
   get "/classes/@year",
    forward: "/plugins/basicSearch/search.gtpl?year=@year",
    validate: { year ==~ /\d{4}/ }
   get "/classes",      forward: "/plugins/basicSearch/search.gtpl"
   get "/search/basic", forward: "/plugins/basicSearch/search.gtpl"
}
   
before {
  log.info "visiting ${request.requestURI}"
  binding.uri = request.requestURI
  request.message = "Basic Search Message"
}
    
after {
  log.info "exiting ${request.requestURI}"
}   
   
before {
  log.info "visiting ${request.requestURI}"
  binding.uri = request.requestURI
  request.message = "Basic Search Message"
}
    
after {
  log.info "exiting ${request.requestURI}"
}
